package bookpos.entity;
/*
 ---------------------------------------------
 CREATE TABLE `customer` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `CUSTOMERNO` varchar(36) NOT NULL,
  `CUSTOMERNAME` varchar(36) NOT NULL,
  `TELEPHONE` varchar(36) DEFAULT NULL,
  `ADDRESS` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `CUSTOMERNO` (`CUSTOMERNO`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;
------------------------------------------------------------ 
 */

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

/**
 * 订单信息实体类
 * @author WZB
 *
 */
@Entity
@Table(name = "bookpos_orders")
@DynamicInsert(true)
@DynamicUpdate(true)
public class Orders implements java.io.Serializable {
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name ="ID",nullable=false,length=11)
	private Integer id;
	@Column(name ="oid",nullable=false,length=30)
	private String oid;
	@Column(name ="cid",nullable=true,length=11)
	private Integer cid;
	@Column(name ="bdate",nullable=true,length=20)
	private Long bdate;
	@Column(name ="total",nullable=false,length=10)
	private Double total;
	
	public Orders(){
		this.cid=0;
		this.bdate=new Date().getTime();
		
	}
	
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getOid() {
		return oid;
	}
	public void setOid(String oid) {
		this.oid = oid;
	}
	public Integer getCid() {
		return cid;
	}
	public void setCid(Integer cid) {
		this.cid = cid;
	}
	public Long getBdate() {
		return bdate;
	}
	public void setBdate(Long bdate) {
		this.bdate = bdate;
	}
	public Double getTotal() {
		return total;
	}
	public void setTotal(Double total) {
		this.total = total;
	}
	
	
}
